﻿//-----------------------------------------------------------------------
// <copyright file="Configuration.cs" company="QUT">
//     Copyright QUT 2009.
// </copyright>
//-----------------------------------------------------------------------

using System;
using System.Collections.Generic;
using System.Drawing;
using System.Linq;
using System.Text;

using GenerateKml.Properties;

namespace GenerateKml
{
    /// <summary>
    /// This class will provide all configuration information as required.
    /// </summary>
    public class Configuration
    {
        /// <summary>
        /// Gets or sets a value indicating whether the welcome screen will be shown when the user loads the application.
        /// </summary>
        /// <value>The welcome screen will be shown if <c>true</c>; otherwise, <c>false</c>.</value>
        public static bool ShowWelcomeScreen 
        {
            get { return Settings.Default.ShowWelcomeScreen; }
            set { Settings.Default.ShowWelcomeScreen = value; }
        }

        /// <summary>
        /// Gets or sets the colour to be used for the ALP place mark.
        /// </summary>
        /// <value>The ALP colour.</value>
        public static Color ALPColour 
        {
            get { return Color.FromArgb(int.Parse(Settings.Default.ALPColour)); }
            set { Settings.Default.ALPColour = value.ToArgb().ToString(); }
        }

        /// <summary>
        /// Gets or sets the colour to be used for the LP place mark.
        /// </summary>
        /// <value>The LP colour.</value>
        public static Color LPColour
        {
            get { return Color.FromArgb(int.Parse(Settings.Default.LPColour)); }
            set { Settings.Default.LPColour = value.ToArgb().ToString(); }
        }

        /// <summary>
        /// Gets or sets the colour to be used for the NP place mark.
        /// </summary>
        /// <value>The NP colour.</value>
        public static Color NPColour
        {
            get { return Color.FromArgb(int.Parse(Settings.Default.NPColour)); }
            set { Settings.Default.NPColour = value.ToArgb().ToString(); }
        }

        /// <summary>
        /// Gets or sets the colour to be used for the DEM place mark.
        /// </summary>
        /// <value>The DEM colour.</value>
        public static Color DEMColour
        {
            get { return Color.FromArgb(int.Parse(Settings.Default.DEMColour)); }
            set { Settings.Default.DEMColour = value.ToArgb().ToString(); }
        }

        /// <summary>
        /// Gets or sets the colour to be used for the NP place mark.
        /// </summary>
        /// <value>The GRN colour.</value>
        public static Color GRNColour
        {
            get { return Color.FromArgb(int.Parse(Settings.Default.GRNColour)); }
            set { Settings.Default.GRNColour = value.ToArgb().ToString(); }
        }

        /// <summary>
        /// Gets or sets the colour to be used for the OTH place mark.
        /// </summary>
        /// <value>The OTH colour.</value>
        public static Color OTHColour
        {
            get { return Color.FromArgb(int.Parse(Settings.Default.OTHColour)); }
            set { Settings.Default.OTHColour = value.ToArgb().ToString(); }
        }

        /// <summary>
        /// Saves this instance.
        /// </summary>
        public static void Save()
        {
            Settings.Default.Save();
        }
    }
}
